#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2019/2/13 18:25
@desc
"""

import optparse


parser = optparse.OptionParser()
parser.add_option("-s", "--server", dest="server", help="ftp server ip_addr")
parser.add_option("-P", "--port", type="int", dest="port", help="ftp server port")
parser.add_option("-u", "--username", dest="username", help="username")
parser.add_option("-p", "--password", dest="password", help="password")


fakeArgs = ['-s','localhost','-P','21', '-u', 'admin', '-p', 'admin123']
options, args = parser.parse_args(fakeArgs)

print(options)
print(args)
